package com.wokeMy.view;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;

import com.example.woke.MainActivity;
import com.zhongcai.online.R;

public class MyQidongActivity extends Activity {

    private final int SPLASH_DISPLAY_LENGHT = 3000;
    private Handler handler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_my_qidong);
        final String s=getIntent().getStringExtra("deadToLive");
        handler = new Handler();
        // 延迟SPLASH_DISPLAY_LENGHT时间然后跳转到MainActivity
        handler.postDelayed(new Runnable() {

            @Override
            public void run() {
                Intent intent = new Intent(MyQidongActivity.this,
                        MainActivity.class);
                intent.putExtra("deadToLive",s);// 极光推送App已经关了打开message
                intent.putExtra("chenkUp","chenkUp");// 检查更新
                startActivity(intent);
                MyQidongActivity.this.finish();
            }
        }, SPLASH_DISPLAY_LENGHT);
    //测试

    }


}